<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>银联全渠道PC/WAP跳转银联页面支付产品示例</title>
	<script src="${ctxStatic}/jquery/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">  
		function forRefund(){
			$.ajax({
				type:"POST",
				data:{
					orderId:$("#orderId").val(),
					txnAmt:$("#txnAmt").val()
				},
				async: false,
				url: "${ctxf}/refund/wx/forRefund",
				dataType:"json",
				success:function(data){
					alert(data.message);
				},
				error:function() {
				}
			});	
		}
	</script>
</head>
<body>
	<table width="80%" height="40%" id="toptable" align="center"  cellpadding="3" cellspacing="1"  bgcolor="#99CC59;" >
		<tr>
			<td align="center" valign="top" width="70%" bgcolor="#FFFFEE">
				<div id="consumeDiv" style="display:block">
					<form action="${ctxf}/refund/wx/forRefund" method="post" name="refundFrm" id="refundFrm" target="_blank">
						<input type="hidden" id="orderId" name="orderId" value="${order.code }"/>
						<table width="100%" height="100%"  border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#AACC00">
							<tr>
								<td align="center" valign="top" bgcolor="#FFFFEE">
									<table width="100%" height="100%"  border="0" cellpadding="3" cellspacing="0"  class="px14">
										<tr>
											<td align="right" valign="middle">退款金额txnAmt：</td>
											<td valign="middle"><input type="text" name="txnAmt" value="${order.totalAmount }">（单位为分）</td>
										</tr>
										<tr>
											<td valign="middle"><b>
												<input name="button" type="button" value="退款" class="btn" onClick="forRefund();" />
											</td>
											<td valign="middle">&nbsp;</td>
										</tr>
									</table>
								</td>
							</tr>      
						</table>
					</form>
				</div>
			</td>
		</tr>
	</table>
</body>
</html>